import { Navigate } from "react-router-dom";

import Dashboard from "../pages/dashboard";
import Posts from "../pages/posts";
import Films from "../pages/films";
import Cinemas from "../pages/cinemas";
// import PostsAdd from "../pages/posts/add";
import PostsShow from "../pages/posts/show";

// eslint-disable-next-line import/no-anonymous-default-export
export default [
  {
    path: "",
    show: false,
    element: <Navigate to="/dashboard" replace />,
  },
  {
    path: "dashboard",
    name: "仪表盘",
    show: true,
    element: <Dashboard />,
  },
  {
    path: "posts",
    name: "帖子",
    show: true,
    element: <Posts />,
  },
  {
    path: "posts-add",
    name: "新增帖子",
    show: false,
    element: <PostsShow />,
  },
  {
    path: "posts-edit/:id",
    name: "编辑帖子",
    show: false,
    element: <PostsShow />,
  },
  {
    path: "films",
    name: "电影",
    show: true,
    element: <Films />,
  },
  {
    path: "cinemas",
    name: "影院",
    show: true,
    element: <Cinemas />,
  },
];
